//
//  ViewController.m
//  腾讯地图
//
//  Created by 陈强 on 17/2/8.
//  Copyright © 2017年 强. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

    
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupMapView];
}


- (void)setupMapView
{
        self.mapView = [[QMapView alloc] initWithFrame:self.view.bounds];
        self.mapView.zoomLevel = 10;
        self.mapView.showTraffic = YES;
        [self.view addSubview:self.mapView];
}

    
    //地图将会显示的时候必须调用
- (void)viewWillAppear:(BOOL)animated {
    [_mapView viewWillAppear];
}
    
    //地图不再显示的时候必须调用
- (void)viewDidDisappear:(BOOL)animated {
    [_mapView viewDidDisappear];
}
    
@end
